package test.socket

import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.util.AttributeSet
import android.view.View

/**
 *
 * @author Eson Yu
 * @date 2020/12/29 14:17
 */
class CustomView @JvmOverloads constructor(
        context: Context?,
        attrs: AttributeSet? = null,
        defStyleAttr: Int = 0,
        defStyleRes: Int = 0)
    : View(context, attrs, defStyleAttr, defStyleRes) {

    override fun onDraw(canvas: Canvas?) {
        super.onDraw(canvas)
        canvas?.drawArc(10f, 10f, 20f, 20f, 0f, 360f, true, Paint().apply { color = Color.BLACK })
    }


}